<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>holitdata-motormux.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>Holit Data Systems Motor MUX driver.  
<a href="#_details">More...</a></p>
<code>#include &quot;<a class="el" href="common_8h_source.html">common.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="common-mmux_8h_source.html">common-MMUX.h</a>&quot;</code><br/>

<p><a href="holitdata-motormux_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga1d4967a1dc141fa7c78fce37bdc9ee37">HDMMUX_I2C_ADDR</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gabb77ec3e99c4cad617cc1ede72606c3b">HDMMUX_CMD_MOTOR</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga8e99d91f599743f5f4c5666363d946b9">HDMMUX_CMD_ADDRCHNG</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga9a17309959ed01c7af50242ac92c4834">HDMMUX_CMD_RST_TACH_A</a>&#160;&#160;&#160;0x03</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga7694f35d70f794746f420449222dda13">HDMMUX_CMD_RST_TACH_B</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gaf985f76ca86f04bb92d68f327607a760">HDMMUX_CMD_RST_TACH_C</a>&#160;&#160;&#160;0x05</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga152bc60e5dd65d889b5564b33b0c6278">HDMMUX_MOTOR_A</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga5aed7616cabe6a49f4c82107d8ab7ea3">HDMMUX_MOTOR_B</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga921659e14e3c5a464681ef15bc74ac33">HDMMUX_MOTOR_C</a>&#160;&#160;&#160;0x03</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gae744ba909813538c7989e09713bd6e9e">HDMMUX_MOTOR_OTHER</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gaba830d33f1e2e13bb6e02e4c9f997cb1">HDMMUX_MOTOR_RIGHT</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gaa785cf23c29f1cde670339cff405c89c">HDMMUX_MOTOR_LEFT</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga8b5c1f641e616e32ca81f86376d78f8e">HDMMUX_ROT_FORWARD</a>&#160;&#160;&#160;(0x01 &lt;&lt; 6)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga4f09a764ccdceae83b4269941e60dc3d">HDMMUX_ROT_REVERSE</a>&#160;&#160;&#160;(0x02 &lt;&lt; 6)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gac2a359c98e7ca505517479e4b6c203d9">HDMMUX_ROT_STOP</a>&#160;&#160;&#160;(0x03 &lt;&lt; 6)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga69f30e70456781d8f73737c265a7b715">HDMMUX_ROT_CONSTSPEED</a>&#160;&#160;&#160;(0x01 &lt;&lt; 4)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gad7cad3b457f30cc41b26baa22fcb1a48">HDMMUX_ROT_RAMPUP</a>&#160;&#160;&#160;(0x02 &lt;&lt; 4)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga9f9ea0c3182e48853500d9e0beeec80d">HDMMUX_ROT_RAMPDOWN</a>&#160;&#160;&#160;(0x03 &lt;&lt; 4)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga58db191452bcfe01d6f799901eebbb6b">HDMMUX_ROT_UNLIMITED</a>&#160;&#160;&#160;(0x00 &lt;&lt; 2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gaddab324a4bb63f681c7ee96afb21614e">HDMMUX_ROT_DEGREES</a>&#160;&#160;&#160;(0x01 &lt;&lt; 2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga2134053b53a01ff59be26e713b1c4de1">HDMMUX_ROT_ROTATIONS</a>&#160;&#160;&#160;(0x02 &lt;&lt; 2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gad7969b064d524a58417f7dfca4b40fe2">HDMMUX_ROT_SECONDS</a>&#160;&#160;&#160;(0x03 &lt;&lt; 2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga90a93643e9455bd364f447e84a37778f">HDMMUX_ROT_POWERCONTROL</a>&#160;&#160;&#160;(0x01 &lt;&lt; 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga589429a31051aad29af4ce91de5e0bca">HDMMUX_ROT_BRAKE</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga64c0b177003798c3abc2dc180cd12869">HDMMUX_ROT_FLOAT</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga535f096dd8eef8d1c86cd818eb165c92">HDMMUXinit</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gaf4c7a5f3640743090b2d360e7333ea2f">HDMMUXreadStatus</a> (tSensors link, ubyte &amp;motorStatus, long &amp;tachoA, long &amp;tachoB, long &amp;tachoC)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gad0558a4dd874dfda556cbe2cf2b81372">HDMMUXsendCommand</a> (tSensors link, ubyte mode, ubyte channel, ubyte rotparams, long duration, byte power, byte steering)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga494763eb03935fb7266a4b73e4670178">HDMMotor</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor, byte power)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga45626902cadcdee073783a5973021192">HDMotorStop</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gafc336fc65157f3ad43c92311d8ff6ef2">HDMotorStop</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor, bool brake)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga23bc66bcc708a0242b9fd9ce14a74b7a">HDMMotorSetRotationTarget</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor, float rottarget)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga9001ade37d758427c5b6ee16fe8c2310">HDMMotorSetTimeTarget</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor, float timetarget)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#gacb9ca2a2a00494399d5a49b0e768a452">HDMMotorSetEncoderTarget</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor, long enctarget)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga34aab3c9e76f83afb10fe3bda30bd4a8">HDMMotorEncoder</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga741e301ad1f831e39d9c14379115b4db">HDMMotorEncoderReset</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga7879fffe542c0918c97d5b5cfb277c4e">HDMMotorEncoderResetAll</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga633cd6ad7e5682af6e0a3bfd9b793442">HDMMotorBusy</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga8bd10328a9988cae8a9b58956664804b">HDMMotorSetBrake</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga9082ae983475e561df02ed09d4dfbe3a">HDMMotorSetFloat</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga6c2ffd3d9050a7fdaa89fbdda23a5b3d">HDMMotorSetSpeedCtrl</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor, bool constspeed)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga947aaf8a97d56a6ebdb886bead2efca0">HDMMotorSetRamping</a> (<a class="el" href="group___m_m_u_x-common__h.html#ga11217de3dd0a7e4159c3578c1cdbba12">tMUXmotor</a> muxmotor, ubyte ramping)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga19484ff15e883671827a693258717351">HDMMUX_I2CRequest</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__holitdata.html#ga82af72165d856c59557672bb7fa851d0">HDMMUX_I2CReply</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Holit Data Systems Motor MUX driver. </p>
<p><a class="el" href="holitdata-motormux_8h.html" title="Holit Data Systems Motor MUX driver.">holitdata-motormux.h</a> provides an API for the Holit Data Systems Motor MUX.</p>
<p>Changelog:</p>
<ul>
<li>0.1: Initial release</li>
<li>0.2: Replaced array structs with typedefs<br/>
 Uses new split off include file MMUX-common.h</li>
</ul>
<p>Credits:</p>
<ul>
<li>Big thanks to Holit Data Systems for providing me with the hardware necessary to write and test this.</li>
<li>Thanks to Cheh from Holit Data Systems for the extensive testing and subsequent bug reports :)</li>
</ul>
<p>TODO:</p>
<ul>
<li>Add support for multiple MUXes per sensor port</li>
<li>Ramping up and down of motors</li>
</ul>
<p>License: You may use this code as you wish, provided you give credit where its due.</p>
<p>THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Xander Soldaat (xander_at_botbench.com) </dd></dl>
<dl class="date"><dt><b>Date:</b></dt><dd>20 February 2011 </dd></dl>
<dl class="version"><dt><b>Version:</b></dt><dd>0.2 </dd></dl>

<p>Definition in file <a class="el" href="holitdata-motormux_8h_source.html">holitdata-motormux.h</a>.</p>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:43 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
